package com.shujia.wyh.day06;

public class ArrayDemo6 {
    public static void main(String[] args) {
        int[] arr = {11,22,33,44,55,66};
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(arr[4]);
        System.out.println(arr[5]);
        //ArrayIndexOutOfBoundsException 数组索引越界异常
//        System.out.println(arr[6]);

//        arr = null;
        //NullPointerException 空指针异常
        //将来开发中如果出现这样的问题很有可能是因为没有数据，检查下数据获取的逻辑代码
//        System.out.println(arr[0]);
    }
}
